using System;

using SBPweb.Data;

namespace SBPweb.PROvibe.Resources.Entities
{
	public class ActorSiteRole: Entity, IActorSiteRole
	{

		#region Private fields

		private const string FIELDNAME_ActorId = "ActorId";
		private const string FIELDNAME_SiteId = "SiteId";
		private const string FIELDNAME_RoleId = "RoleId";

		#endregion

		#region Constructor logic

		static ActorSiteRole()
		{
			RegisterEntityTypeToColumns(typeof(ActorSiteRole));
		}

		public ActorSiteRole()
            : base(null)
        {
		}

        public ActorSiteRole(ActorSiteRole entity)
            : base(entity)
        {
        }
        
        #endregion

		#region Public property accessors

		public virtual int ActorId
		{
			get
			{
				return GetValue<Int32>(FIELDNAME_ActorId);
			}
			set
			{
				SetValue<Int32>(FIELDNAME_ActorId, value);
			}
		}

		public virtual int SiteId
		{
			get
			{
				return GetValue<Int32>(FIELDNAME_SiteId);
			}
			set
			{
				SetValue<Int32>(FIELDNAME_SiteId, value);
			}
		}

		public virtual int RoleId
		{
			get
			{
				return GetValue<Int32>(FIELDNAME_RoleId);
			}
			set
			{
				SetValue<Int32>(FIELDNAME_RoleId, value);
			}
		}

		#endregion

		#region Overridden methods

		public override object Clone()
		{
			ActorSiteRole actorRole = new ActorSiteRole();

			actorRole.ActorId = this.ActorId;
			actorRole.SiteId = this.SiteId; 
			actorRole.RoleId = this.RoleId;

			return actorRole;
		}

		#endregion

	}
}